home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
telecomm
/
flashdoc.lzh
/
DATE.DO
< prev
next >
Wrap
Text File
|
1992-02-21
|
6KB
|
329 lines
>** - File loading - PLEASE WAIT...|
>**
date.do V. 3.2.0 - 02/21/92|
Copyright (C) 1992 by Al Fasoldt
What this does:
DATE.DO runs TD.PRG and uses the data file that TD creates to
read the date and time. It then sets certain variables so that
the date and time can be used in scripts. TD.PRG must be in the
same folder that DATE.DO runs from. (TD.PRG was supplied with
this script.)
This script will work properly up to the last day in the year
2000.
You do not need to have a hardware clock in your ST to use this
script. As long as your computer's clock is set properly,
DATE.DO will function OK.
This version also uses a variable for the location of DO files.
This variable, Q, is set by another script that runs prior to
DATE.DO. You can remove the line that uses a "cd" command and
the variable Q if you wish.
|
>**
Here are the variable assignments:
A - Full date in U.S. form.
B - Full date in Canadian form.
(examples: February 15, 1992; 15 February, 1992).
D - Day of the month in two digits.
M - Month spelled in full.
O - Month in two digits.
W - Year in two digits.
X - Year in four digits.
Y - Time the script was executed.
There are dozens of uses for these variables. The ones I use the
most are D, as a file extender for daily telecomm text files
that I automatically save (as "email.$D" and so on) and W, for
making new backups each time the month changes.
You can also simply use variable A to insert the full date in an
automated script, using the "log" command ("log $A") and so
forth.
|
>** Beginning of script.|
>$Y|
>$Z|
>ty |
>** may want to remove the next line.|
>cd $Q|
>**|
>op td.prg|
>if ~op jmp NoData|
>ex td.prg|
>pa 1|
>op td.dat|
>inp $Y|
>inp $Z|
>ty $Y|
>ty $Z|
>ifi $Z "1991" jmp 91|
>ifi $Z "1992" jmp 92|
>ifi $Z "1993" jmp 93|
>ifi $Z "1994" jmp 94|
>ifi $Z "1995" jmp 95|
>ifi $Z "1996" jmp 96|
>ifi $Z "1997" jmp 97|
>ifi $Z "1982" jmp 98|
>ifi $Z "1999" jmp 99|
>ifi $Z "2000" jmp 00|
>ifi $Z "2001" jmp 01|
>jmp NoYear|
>L: 91|
>$X 1991|
>$W 91|
>jmp month|
>L: 92|
>$X 1992|
>$W 92|
>jmp month|
>L: 93|
>$X 1993|
>$W 93|
>jmp month|
>L: 94|
>$X 1994|
>$W 94|
>jmp month|
>L: 95|
>$X 1995|
>$W 95|
>jmp month|
>L: 96|
>$X 1996|
>$W 96|
>jmp month|
>L: 97|
>$X 1997|
>$W 97|
>jmp month|
>L: 98|
>$X 1998|
>$W 98|
>jmp month|
>L: 99|
>$X 1999|
>$W 99|
>jmp month|
>L: 00|
>$X 2000|
>$W 00|
>jmp month|
>L: 01|
>$X 2001|
>jmp month|
>L: month|
>ifi $Z "01_" jmp jan|
>ifi $Z "02_" jmp feb|
>ifi $Z "03_" jmp mar|
>ifi $Z "04_" jmp apr|
>ifi $Z "05_" jmp may|
>ifi $Z "06_" jmp jun|
>ifi $Z "07_" jmp jul|
>ifi $Z "08_" jmp aug|
>ifi $Z "09_" jmp sep|
>ifi $Z "10_" jmp oct|
>ifi $Z "11_" jmp nov|
>ifi $Z "12_" jmp dec|
>jmp NoData|
>L: jan|
>$M January|
>jmp day|
>L: feb|
>$M February|
>jmp day|
>L: mar|
>$M March|
>jmp day|
>L: apr|
>$M April|
>jmp day|
>L: may|
>$M May|
>jmp day|
>L: jun|
>$M June|
>jmp day|
>L: jul|
>$M July|
>jmp day|
>L: aug|
>$M August|
>jmp day|
>L: sep|
>$M September|
>jmp day|
>L: oct|
>$M October|
>jmp day|
>L: nov|
>$M November|
>jmp day|
>L: dec|
>$M December|
>L: day|
>ifi $Z "_01 " jmp D01|
>ifi $Z "_02 " jmp D02|
>ifi $Z "_03 " jmp D03|
>ifi $Z "_04 " jmp D04|
>ifi $Z "_05 " jmp D05|
>ifi $Z "_06 " jmp D06|
>ifi $Z "_07 " jmp D07|
>ifi $Z "_08 " jmp D08|
>ifi $Z "_09 " jmp D09|
>ifi $Z "_10 " jmp D10|
>ifi $Z "_11 " jmp D11|
>ifi $Z "_12 " jmp D12|
>ifi $Z "_13 " jmp D13|
>ifi $Z "_14 " jmp D14|
>ifi $Z "_15 " jmp D15|
>ifi $Z "_16 " jmp D16|
>ifi $Z "_17 " jmp D17|
>ifi $Z "_18 " jmp D18|
>ifi $Z "_19 " jmp D19|
>ifi $Z "_20 " jmp D20|
>ifi $Z "_21 " jmp D21|
>ifi $Z "_22 " jmp D22|
>ifi $Z "_23 " jmp D23|
>ifi $Z "_24 " jmp D24|
>ifi $Z "_25 " jmp D25|
>ifi $Z "_26 " jmp D26|
>ifi $Z "_27 " jmp D27|
>ifi $Z "_28 " jmp D28|
>ifi $Z "_29 " jmp D29|
>ifi $Z "_30 " jmp D30|
>ifi $Z "_31 " jmp D31|
>jmp NoData|
>L: D01|
>$D 1|
>jmp combine_vars|
>L: D02|
>$D 2|
>jmp combine_vars|
>L: D03|
>$D 3|
>jmp combine_vars|
>L: D04|
>$D 4|
>jmp combine_vars|
>L: D05|
>$D 5|
>jmp combine_vars|
>L: D06|
>$D 6|
>jmp combine_vars|
>L: D07|
>$D 7|
>jmp combine_vars|
>L: D08|
>$D 8|
>jmp combine_vars|
>L: D09|
>$D 9|
>jmp combine_vars|
>L: D10|
>$D 10|
>jmp combine_vars|
>L: D11|
>$D 11|
>jmp combine_vars|
>L: D12|
>$D 12|
>jmp combine_vars|
>L: D13|
>$D 13|
>jmp combine_vars|
>L: D14|
>$D 14|
>jmp combine_vars|
>L: D15|
>$D 15|
>jmp combine_vars|
>L: D16|
>$D 16|
>jmp combine_vars|
>L: D17|
>$D 17|
>jmp combine_vars|
>L: D18|
>$D 18|
>jmp combine_vars|
>L: D19|
>$D 19|
>jmp combine_vars|
>L: D20|
>$D 20|
>jmp combine_vars|
>L: D21|
>$D 21|
>jmp combine_vars|
>L: D22|
>$D 22|
>jmp combine_vars|
>L: D23|
>$D 23|
>jmp combine_vars|
>L: D24|
>$D 24|
>jmp combine_vars|
>L: D25|
>$D 25|
>jmp combine_vars|
>L: D26|
>$D 26|
>jmp combine_vars|
>L: D27|
>$D 27|
>jmp combine_vars|
>L: D28|
>$D 28|
>jmp combine_vars|
>L: D29|
>$D 29|
>jmp combine_vars|
>L: D30|
>$D 30|
>jmp combine_vars|
>L: D31|
>$D 31|
>L: combine_vars|
>L: US_date|
>$A "$M $D, $X"|
>L: euro_date|
>$B "$D $M, $X"|
>type |
>type|
>type|
>type Today is $A.|
>type|
>type The time: $Y.||
>type|
>type|
>type Have a nice day!|
>type|
>$Z|
>end|
>L: NoData|
>ty "|Improper data file! Check to see if TD.PRG is on default path.|"|
>ty "|Program terminated.|"|
>end|
>L: NoYear|
>ty "If you are running this in 2002 or later,|"|
>ty "please use an updated version of this script.|"|
>ty "|Program terminated.|"|
>end|